<?php

$name = $_POST['name'];
$area = $_POST['area'];
$detail = $_POST['detail'];
$phone = $_POST['phone'];
$fixphone = $_POST['fixphone'];
//链接数据库
	$data = new mysqli('127.0.0.1','root','','friday');

//	//设置中文
	mysqli_query($data,"SET NAMES utf8");
//	//设置查询语句
	$sql = "INSERT INTO address (name,area,detail,phone,fixphone) VALUES('{$name}','{$area}','{$detail}','{$phone}','{$fixphone}')";
//	//执行
//  //执行sql语句
	if($query =mysqli_query($data, $sql)){
		echo '插入成功';
	}else{
		echo '插入失败'.$data->error;
	}
	mysqli_close($data);

?>